Current Location: Home> Function Categories> lcg_value

lcg_value

Combined linear congruent generator
Name:lcg_value
Category:math
Programming Language:php
One-line Description:Returns a pseudo-random number with a range of (0,1).

Definition and usage

lcg_value() combines linear congruent generators.

Example

 <?php
echo lcg_value ( ) ;
?>

Try it yourself

grammar

 lcg_value ( )

illustrate

lcg_value() returns a pseudo-random number with a range of (0, 1). This function combines two congruent generators with periods 2^31 - 85 and 2^31 - 249. The period of this function is equal to the product of these two prime numbers.

Similar Functions
  • Ancient sine asin

    asin

    Ancientsine
  • Combined linear congruent generator lcg_value

    lcg_value

    Combinedlinearcongru
  • Further method to sort ceil

    ceil

    Furthermethodtosort
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Generate a random integer rand

    rand

    Generatearandominteg
  • Convert decimal to binary decbin

    decbin

    Convertdecimaltobina
  • Anyway atan

    atan

    Anyway
  • Natural logarithm log

    log

    Naturallogarithm
Popular Articles